const Router = require('koa-router')
const { verifyAuth } = require('../middleware/auth.middleware')
const { avatarHandler } = require('../middleware/file.middleware')
const { saveAvatarInfo } = require('../controller/file.controller')

const filetRouter = new Router({ prefix: '/upload' })
// 1.登陆验证
// 2.保存图像文件
// 3.保存图像信息
filetRouter.post('/avatar', verifyAuth, avatarHandler, saveAvatarInfo)

module.exports = filetRouter
